import ItButton from './button/index.js'
import ItIcon from './icon/index.js'
import ItSpace from './space/index.js'
import ItMessage from './message/index.js'
import ItPopup from './popup/index.js'
import ItSearch from './search/index.js'
import ItSelect from './select/index.js'
import ItDatepicker from './datepicker/index.js'
import MonthPicker from './monthpicker/index.js'
import ItPagination from './pagination/index.js'
import ItTable from './table/index.js'
import EmptyBox from './empty-box/index.js'
import RichText from './rich-text/index.js'
import RichEditor from './rich-editor/index.js'
import BasisTable from './basis-table/index.js'
import CustomTable from './custom-table/index.js'
import DialogModel from './dialog-model/DialogModel.js'
import BlockTitle from './block-title/index.js'
import ScrollList from './scroll-list/index.js'
import TopTypes from './top-types/index.js'
import UnfoldFold from './unfold-fold/index.js'
import FileDownload from './file-download/index.js'
const components = [
  ItButton,
  ItIcon,
  ItSpace,
  ItPopup,
  ItSearch,
  ItSelect,
  ItDatepicker,
  MonthPicker,
  ItPagination,
  ItTable,
  EmptyBox,
  RichText,
  RichEditor,
  BasisTable,
  CustomTable,
  BlockTitle,
  ScrollList,
  TopTypes,
  UnfoldFold,
  FileDownload,
]

const install = (app) => {
  components.forEach((i) => {
    app.use(i)
  })
  app.config.globalProperties.$message = ItMessage
}
const ItUi = {
  install,
}
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export {
  ItButton,
  ItSpace,
  ItIcon,
  ItPopup,
  ItSearch,
  ItSelect,
  ItDatepicker,
  MonthPicker,
  ItPagination,
  ItTable,
  EmptyBox,
  RichText,
  RichEditor,
  BasisTable,
  CustomTable,
  BlockTitle,
  ScrollList,
  TopTypes,
  UnfoldFold,
  ItMessage,
  DialogModel,
  FileDownload,
}
export default ItUi
